// stay on kernel stack because may get interrupts!
// ia64_ret_from_clone (which b0 gets in new_thread) switches
// to user stack
- ed->thread.on_ustack = 0;
+ ed->arch._thread.on_ustack = 0;
}
void arch_do_boot_vcpu(struct exec_domain *p)
printf("new_thread: ed=%p, start_pc=%p, regs=%p, sw=%p, new_rbs=%p, IA64_STK_OFFSET=%p, &r8=%p\n",
ed,start_pc,regs,sw,new_rbs,IA64_STK_OFFSET,®s->r8);
sw->b0 = (unsigned long) &ia64_ret_from_clone;
- ed->thread.ksp = (unsigned long) sw - 16;
+ ed->arch._thread.ksp = (unsigned long) sw - 16;
//ed->thread_info->flags = 0;
printk("new_thread, about to call init_all_rr\n");
init_all_rr(ed);
desc->handler->startup(irq);
/* Attempt to bind the interrupt target to the correct CPU. */
+#if 0 /* FIXME CONFIG_SMP ??? */
if ( desc->handler->set_affinity != NULL )
desc->handler->set_affinity(
irq, apicid_to_phys_cpu_present(d->processor));
+#endif
}
else if ( !will_share || !action->shareable )
{
if (stack_size > MAX_USER_STACK_SIZE)
stack_size = MAX_USER_STACK_SIZE;
- current->thread.rbs_bot = STACK_TOP - stack_size;
+ current->arch._thread.rbs_bot = STACK_TOP - stack_size;
}
/*
if (vma) {
memset(vma, 0, sizeof(*vma));
vma->vm_mm = current->mm;
- vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
+ vma->vm_start = current->arch._thread.rbs_bot & PAGE_MASK;
vma->vm_end = vma->vm_start + PAGE_SIZE;
vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE|VM_GROWSUP;
--- ../../linux-2.6.11/arch/ia64/kernel/unaligned.c 2005-03-02 00:38:25.000000000 -0700
-+++ arch/ia64/unaligned.c 2005-04-28 15:40:13.000000000 -0600
++++ arch/ia64/unaligned.c 2005-05-10 15:46:09.000000000 -0600
@@ -437,7 +437,11 @@
}
setreg (unsigned long regnum, unsigned long val, int nat, struct pt_regs *regs)
{
struct switch_stack *sw = (struct switch_stack *) regs - 1;
-@@ -611,7 +615,11 @@
+@@ -522,7 +526,11 @@
+ */
+ if (regnum >= IA64_FIRST_ROTATING_FR) {
+ ia64_sync_fph(current);
++#ifdef XEN
++ current->arch._thread.fph[fph_index(regs, regnum)] = *fpval;
++#else
+ current->thread.fph[fph_index(regs, regnum)] = *fpval;
++#endif
+ } else {
+ /*
+ * pt_regs or switch_stack ?
+@@ -581,7 +589,11 @@
+ */
+ if (regnum >= IA64_FIRST_ROTATING_FR) {
+ ia64_flush_fph(current);
++#ifdef XEN
++ *fpval = current->arch._thread.fph[fph_index(regs, regnum)];
++#else
+ *fpval = current->thread.fph[fph_index(regs, regnum)];
++#endif
+ } else {
+ /*
+ * f0 = 0.0, f1= 1.0. Those registers are constant and are thus
+@@ -611,7 +623,11 @@
}
getreg (unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs)
{
struct switch_stack *sw = (struct switch_stack *) regs - 1;
-@@ -1294,6 +1302,9 @@
+@@ -1294,6 +1310,9 @@
void
ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
{
struct ia64_psr *ipsr = ia64_psr(regs);
mm_segment_t old_fs = get_fs();
unsigned long bundle[2];
-@@ -1502,4 +1513,5 @@
+@@ -1502,4 +1521,5 @@
si.si_imm = 0;
force_sig_info(SIGBUS, &si, current);
goto done;
case 32: /* fp fault */
case 33: /* fp trap */
//result = handle_fpu_swa((vector == 32) ? 1 : 0, regs, isr);
- if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {
+ //if ((result < 0) || (current->thread.flags & IA64_THREAD_FPEMU_SIGFPE)) {
//siginfo.si_signo = SIGFPE;
//siginfo.si_errno = 0;
//siginfo.si_code = FPE_FLTINV;
//siginfo.si_isr = isr;
//siginfo.si_imm = 0;
//force_sig_info(SIGFPE, &siginfo, current);
- }
+ //}
//return;
sprintf(buf, "FP fault/trap");
break;
raise_softirq(AC_TIMER_SOFTIRQ);
}
+unsigned long __hypercall_create_continuation(
+ unsigned int op, unsigned int nr_args, ...)
+{
+ printf("__hypercall_create_continuation: not implemented!!!\n");
+}
+
+///////////////////////////////
+
///////////////////////////////
// from arch/x86/apic.c
///////////////////////////////
#define seq_printf(a,b...) printf(b)
#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
+//
+#define __smp_processor_id() (current->processor)
+
+// needed for newer ACPI code
+#define asmlinkage
+
+#define FORCE_CRASH() asm("break 0;;");
+
// these declarations got moved at some point, find a better place for them
extern int opt_noht;
extern int ht_per_core;
};
#define active_mm arch.active_mm
-#define thread arch._thread
+//#define thread arch._thread
// FOLLOWING FROM linux-2.6.7/include/sched.h